package com.david.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @program: Blog-Vue
 * @description:
 * @author: David
 * @version:
 * @create: 2022-05-09 17:29
 **/
@Configuration
@EnableTransactionManagement
@MapperScan("com.dawei.mapper")
public class MybatisPlusConfig {
    /**
     * PaginationInterceptor 是一个分页插件
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        return paginationInterceptor;
    }
}
